/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sda.levelup.threads;

import java.util.ArrayList;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 *
 * @author Дима
 */
public class MainThreads
{
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>(100000);
        String data = "walked along a pillared gallery and through a pointed arch";
        for (int i =0; i<100000; i++){
            list.add(data);
        }
        /*Thread thr1 = new Thread(new RunnableClass((list)));
        thr1.start();*/
        ExecutorService pool = Executors.newFixedThreadPool(5);
        pool.submit(new RunnableClass(list));
        pool.shutdown();
    }
}
